//
//  BCWalletBottomView.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/11/23.
//  Copyright © 2018年 guoshikeji. All rights reserved.
//

#import "BCWalletBottomView.h"

@interface BCWalletBottomView ()

@end

@implementation BCWalletBottomView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setupSubviews];
    }
    return self;
}

- (void)setupSubviews {
    self.leftButton = [BCBottomButton new];
    self.leftButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
    self.leftButton.titleLabel.adjustsFontSizeToFitWidth = true;
    [self.leftButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self addSubview:self.leftButton];
    self.leftButton.backgroundColor = [UIColor darkMainColor];
    //
    self.rightButton = [BCBottomButton new];
    self.rightButton.titleLabel.font = self.leftButton.titleLabel.font;
    [self.rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.rightButton.titleLabel.adjustsFontSizeToFitWidth = true;
    [self addSubview:self.rightButton];
    self.rightButton.backgroundColor = [UIColor darkSubMainColor];
    //
    [self.leftButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(self);
        make.height.mas_equalTo([self.leftButton.class defaultHeight]);
        make.right.mas_equalTo(self.mas_centerX);
    }];
    [self.rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.right.mas_equalTo(self);
        make.height.mas_equalTo([self.rightButton.class defaultHeight]);
        make.left.mas_equalTo(self.mas_centerX);
    }];
}



+ (CGFloat)defaultHeight {
    return [BCBottomButton defaultHeight];
}

@end
